import { baseRequest } from '@/utils/request'

const request = (url, ...arg) => baseRequest(`/api/webapp/dev/datacenter/${url}`, ...arg)
const fileRequest = (url, ...arg) => baseRequest(`/api/webapp/dev//file/${url}`, ...arg)

export default {
    add(data) {
        return request('add', data, 'post')
    },
    delete(data) {
        return request('delete', data, 'post')
    },
    edit(data) {
        return request('edit', data, 'post')
    },
    page(data) {
        return request('page', data, 'get')
    },
    tree(data) {
        return request('orgTreeSelector', data, 'get')
    },

    tree(data) {
        return request('orgTreeSelector', data, 'get')
    },
    pagedatacenter(data){
        return fileRequest('pagedatacenter', data, 'get')
    }
}
